#!/bin/bash

# Performance test for HBase column family and qualifier names
# @author dino.keco
# @email dino.keco@gmail.com
# @date 2012.06.12

num_of_column_families=( 1 2 3 )

column_family_qualifier_names=( D DATA LONG_DATA )

qf_number=100
table_name=cfn_table
num_of_mappers=2
records_per_mapper=100

for cf_number in "${num_of_column_families[@]}"
do
	for cfq_name in "${column_family_qualifier_names[@]}"
	do
	# run hadoop map reduce job 
	hadoop jar hbase-showcase-1.0.jar ba.keco.hbase.cfqnames.MapReduceTest -Dhbase.showcase.cf.number=${cf_number} -Dhbase.showcase.qf.number=${qf_number} -Dhbase.showcase.table.name=${table_name} -Dhbase.showcase.input.records=${records_per_mapper} -Dhbase.showcase.mappers=${num_of_mappers} -Dhbase.showcase.cf.name=${cfq_name} -Dhbase.showcase.qf.name=${cfq_name}

	# check table size
	hadoop fs -du /hbase/${table_name}
	done
done
